<template>
	<view class="cart">
		<!-- 导航栏 -->
		<!-- <nav-bar class="i_top" isBack>
			<view class="i_tCan" slot="center">
				<view :class="{active:tab == 1}" @click="tabtop(1)">商品<text></text></view>
				<view :class="{active:tab == 2}" @click="tabtop(2)">产品包<text></text></view>
			</view>
		</nav-bar> -->
		<nav-bars class="i_top" bgColor="#fff" fontColor="#000">
			<view class="i_tCan" slot="default">
				<view :class="{active:tab == 1}" @click="tabtop(1)">商品<text></text></view>
				<view :class="{active:tab == 2}" @click="tabtop(2)">产品包<text></text></view>
			</view>
		</nav-bars>

		<!-- 店铺商品 -->
		<view v-if="tab==1">
			<!-- 顶部操作栏 -->
			<view class="c_top">
				<!-- minusCartAll -->
				<view class="c_tBtn" @tap="minusCarts">{{flag?"完成":"管理"}}</view>
				<view class="c_tTxt">共{{totalLength}}件家具</view>
			</view>
			<!-- 购物车 -->
			<view class="c_cart">
				<view class="c_cGroup" v-for="items in cart" :key="items.store_id">
					<view class="c_cShop">
						<view class="c_cSelect" :class="{'active': items.select}" @tap="selectShop(items.store_id)">
							<view class="c_csIcon">
								<image src="/static/mall/selected.png"></image>
							</view>
						</view>
						<view class="c_csInto" @tap="tostroe(items.store_id)">进店</view>
						<view class="c_csLogo">
							<image :src=" items.store_logo"></image>
						</view>
						<view class="c_csName">{{items.store_name}}</view>
					</view>
					<view class="c_cList">
						<view class="c_cItem" v-for="(item,index) in items.medical_list" :key="index">
							<view class="c_cSelect" :class="{'active': item.select}"
								@tap="selectGoods(items.store_id, item.id)">
								<view class="c_csIcon">
									<image src="/static/mall/selected.png"></image>
								</view>
							</view>
							<view class="c_cImage" @click="toProduct(item.product_id)">
								<image :src="item.main_imgurl"></image>
							</view>
							<view class="c_cCont">
								<view class="c_cName omit-1" @click="toProduct(item.product_id)">{{item.product_title}}
								</view>
								<view class="c_cSize omit-1">
									<view class="c_csIcon"><text class="iconfont icon-more"></text></view>
									<text v-for="(item2,index) in item.attribute" :key="index">{{item2.value}}</text>
								</view>
								<view class="c_cPrice">￥<text>{{item.price}}</text></view>
								<!-- <view class="c_cPrice2">￥<text>{{item.primary_price}}</text></view> -->
								<view class="c_ccart_nums">
									<view class="c_cnMinus" @click="minusCart(items.store_id,item)"></view>
									<view class="c_cncart_num"><input type="number" v-model="item.cart_num" /></view>
									<view class="c_cnAdd" @click="addCart(items.store_id,item)"></view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 提交订单栏 -->
			<submit-bar class="c_submit">
				<view class="c_sLeft" slot="left">
					<view class="c_sSelect" :class="{'active': isAllSelect}" @tap="selectAll">
						<view class="c_ssFalse">
							<image src="/static/mall/Not_all.png"></image>
						</view>
						<view class="c_ssTrue">
							<image src="/static/mall/selected.png"></image>
						</view>
					</view>
					<view class="c_cTxt1">全选</view>
					<view class="c_cTxt2"></view>
					<view class="c_cTxt3">￥<text>{{sumPrice}}</text></view>
					<!-- <view class="c_cTxt4">￥<text>{{sumCostPrice}}</text></view> -->
				</view>
				<view class="c_sRight" slot="right" @click="toCartList" v-if="!flag">去结算</view>
				<view class="c_sRight" slot="right" v-if="flag" @click="minusCartAll">删除</view>
			</submit-bar>
		</view>

		<!-- 产品包 -->
		<view class="pacuk" v-if="tab==2">
			<!-- 顶部操作栏 -->
			<view class="c_top">
				<!-- minusCartAll -->
				<view class="c_tBtn" @tap="productCarts">{{productflag?"完成":"管理"}}</view>
				<view class="c_tTxt">共{{productLength}}个产品包</view>
			</view>
			<!-- 购物车 -->
			<view class="c_cart">
				<view class="c_cGroup" v-for="(item,index) in productcart" :key="index">
					<view class="c_cList">
						<view class="c_cItem">
							<view class="c_cSelect" :class="{'active': item.select}" @tap="selectpacks(item.cart_id)">
								<view class="c_csIcon">
									<image src="/static/mall/selected.png"></image>
								</view>
							</view>
							<view class="c_cImage" @click="topack(item.pack_id)">
								<view class="pack">产品包</view>
								<image :src="item.lead_img"></image>
							</view>
							<view class="c_cCont">
								<view class="c_cName omit-1" @click="topack(item.pack_id)">{{item.pack_name}}</view>
								<!-- <view class="c_m2">{{item.area_scope}}㎡</view> -->
								<view class="c_cPrice">￥<text>{{item.price}}</text></view>
								<view class="c_ccart_nums">
									<view class="c_cnMinus" @tap="minuspackCart(item.pack_id, item)"></view>
									<view class="c_cncart_num"><input type="number" v-model="item.buy_num"></view>
									<view class="c_cnAdd" @tap="addpackCart(item.pack_id, item)"></view>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 提交订单栏 -->
			<submit-bar class="c_submit">
				<view class="c_sLeft" slot="left">
					<!-- <view class="c_sSelect" :class="{'active': productAllSelect}" @tap="selectAllpacks()">
						<view class="c_ssFalse">
							<image src="/static/mall/Not_all.png"></image>
						</view>
						<view class="c_ssTrue">
							<image src="/static/mall/selected.png"></image>
						</view>
					</view> -->
					<!-- <view class="c_cTxt1">全选</view> -->
					<view class="c_cTxt2"></view>
					<view class="c_cTxt3" style="margin-left: 4rpx;">￥<text>{{productPrice}}</text></view>
					<!-- <view class="c_cTxt4">￥<text>{{productCostPrice}}</text></view> -->
				</view>
				<view class="c_sRight" slot="right" @click="toproductList" v-if="!productflag">去结算</view>
				<view class="c_sRight" slot="right" v-if="productflag" @click="productCartAll">删除</view>
			</submit-bar>
		</view>
	</view>
</template>

<script>
	import URL from '@/config/url.js'

	import submitBar from '@/components/submitBar/submitBar.vue'
	import service_mall from '@/service/mall.js'
	import $HTTPS from '@/service/DIY.js';
	export default {
		components: {
			submitBar
		},

		data() {
			return {
				cart: null,
				productcart: [],
				isAllSelect: false, // 是否全选中
				productAllSelect: false, // 是否全选中
				productPrice: 0,
				productCostPrice: 0,
				sumPrice: 0,
				sumCostPrice: 0,
				flag: false,
				productflag: false,
				tab: 1,
			}
		},
		onLoad(options) {
			this.$utils.getUrl()
			this.tab = options.tab;
			if (!options.tab) {
				this.getCartList()
			} else {
				this.getPackCartList()
			}
		},
		computed: {
			totalLength() {
				if (this.cart && this.cart.length > 0) {
					let total = 0;
					this.cart.map(item1 => {
						if (item1.medical_list && item1.medical_list.length > 0) {
							total += item1.medical_list.length
						}
					})
					return total
				} else {
					return 0
				}
			},
			productLength() {
				if (this.productcart && this.productcart.length > 0) {
					let total = 0;
					total += this.productcart.length
					return total
				} else {
					return 0
				}
			},
		},
		methods: {
			minusCarts() {
				this.flag = !this.flag
			},
			productCarts() {
				this.productflag = !this.productflag
			},
			tabtop(e) {
				this.tab = e
				if (e == 2) {
					this.getPackCartList()
				} else {
					this.getCartList()
				}
			},
			toProduct(e) {
				uni.navigateTo({
					url: `/pages_mall/pages/mall/goods_details/goods_details?id=${e}`
				})
			},
			topack(id) {
				uni.navigateTo({
					url: '/pages_product/pages/product/detail/detail?pack_id=' + id,
				});
			},
			tostroe(e) {
				var that = this;
				$HTTPS
					.GetDiyData({
						partner_id: e
					})
					.then(res => {
						if (res.code == 1) {
							let data = res.data;
							console.log(data);
							if (data.content) {
								uni.navigateTo({
									url: '/pages_mall/pages/Decoration/view/index?storeId=' + e
								});
							} else {
								uni.navigateTo({
									url: '/pages_mall/pages/mall/store/storeNew?storeId=' + e
								});
							}
						} else {
							that.$utils.showErr({
								title: res.msg
							});
						}
					})
					.catch(err => {
						that.$utils.showErr({
							title: err
						});
					});
			},
			//获取购物车列表
			getCartList() {
				service_mall.goods_getlist({
						store_id: 0
					})
					.then(res => {
						if (res.code == 1) {
							this.cart = res.data.shop
							this.verifyAllSelect() // 验证是否所有店铺所有商品是否都已选中
							this.countPrice() // 计算价格
						}
					})
			},
			//获取产品包购物车列表
			getPackCartList() {
				service_mall.packCatrList({
					page: 1,
					pagesize: 30,
				}).then(res => {
					if (res.code == 1) {
						//this.cart = res.data.shop
						this.productcart = res.data.packs
					}
				})
			},
			// 选择店铺
			selectShop(store_id) {
				let cart = this.cart
				let shop = cart.find(val => val.store_id == store_id)
				// 全选or全不选
				shop.select = !shop.select
				shop.medical_list.forEach(val => val.select = shop.select)

				this.verifyAllSelect() // 验证是否所有店铺所有商品是否都已选中
				this.countPrice() // 计算价格
			},

			// 选择商品
			selectGoods(store_id, id) {
				let cart = this.cart
				let shop = cart.find(val => val.store_id == store_id)
				let goods = shop.medical_list.find(val => val.id == id)

				// 选中or不选中
				goods.select = !goods.select
				// 判断该店铺下商品是否已全选
				let flag = true
				shop.medical_list.forEach(val => {
					if (!val.select) flag = false
				})
				if (shop.select != flag) shop.select = flag

				this.verifyAllSelect() // 验证是否所有店铺所有商品是否都已选中
				this.countPrice() // 计算价格
			},
			selectpacks(id) {
				let cart = this.productcart
				let product = cart.find(val => val.cart_id == id)
				console.log('选择', product)
				// let array=[];
				// for(var i=0;i<cart.length;i++){
				// 	if(cart[i].select==true && cart[i].cart_id!=id){
				// 		array.push(cart[i])
				// 		break;
				// 	}
				// }
				// if(array.length>=1){
				// 	uni.showToast({
				// 		title: '一次只能选择一个产品包',
				// 		icon: 'none'
				// 	});
				// 	return;
				// }
				// 选中or不选中
				product.select = !product.select;
				cart.map(item => {
					if (item.cart_id != id) {
						item.select = false
					}
				})
				//this.pAllSelect() // 验证是否所有产品包是否都已选中
				this.packCountPrice() // 计算产品包价格
			},
			// 产品包全选or全不选
			selectAllpacks() {
				this.productAllSelect = !this.productAllSelect
				this.productcart.forEach(v => v.select = this.productAllSelect)
				this.pAllSelect() // 验证是否所有店铺所有商品是否都已选中
				this.packCountPrice() // 计算价格
			},

			// 全选or全不选
			selectAll() {
				this.isAllSelect = !this.isAllSelect
				this.cart.forEach(val => {
					val.select = this.isAllSelect
					val.medical_list.forEach(v => v.select = this.isAllSelect)
				})
				this.verifyAllSelect() // 验证是否所有店铺所有商品是否都已选中
				this.countPrice() // 计算价格
			},

			// 验证所有商品是否全选
			verifyAllSelect() {
				let isAll = this.cart.find(val => !val.select) ? false : true
				if (this.isAllSelect != isAll) this.isAllSelect = isAll
			},

			// 计算价格
			countPrice() {
				let price = 0,
					costPrice = 0
				this.cart.forEach(val => {
					val.medical_list.forEach(v => {
						if (v.select) {
							price = this.$utils.accAdd(price, this.$utils.accMul(v.cart_num, v.price))
							costPrice = this.$utils.accAdd(costPrice, this.$utils.accMul(v.cart_num, v
								.primary_price))
						}
					})
				})

				this.sumPrice = price
				this.sumCostPrice = costPrice
			},
			//计算产品包价格
			packCountPrice() {
				let price = 0,
					costPrice = 0
				this.productcart.forEach(val => {
					if (val.select) {
						price = this.$utils.accAdd(price, this.$utils.accMul(val.buy_num, val.price))
						//costPrice = this.$utils.accAdd(costPrice, this.$utils.accMul(val.buy_num,val.price))
					}
				})
				this.productPrice = price
				//this.sumCostPrice = costPrice
			},
			// 验证所有产品包是否全选
			pAllSelect() {
				let isAll = this.productcart.find(val => !val.select) ? false : true
				if (this.productAllSelect != isAll) this.productAllSelect = isAll
			},

			// 计算产品包价格
			packPrice() {
				let price = 0,
					costPrice = 0
				this.productcart.forEach(v => {
					if (v.select) {
						price = this.$utils.accAdd(price, this.$utils.accMul(1, v.price))
						// costPrice = this.$utils.accAdd(costPrice, this.$utils.accMul(v.cart_num, v.primary_price))
					}
				})

				this.productPrice = price
				// this.sumCostPrice = costPrice
			},

			// 添加商品
			addCart(store_id, item) {
				let cart = this.cart
				let shop = cart.find(val => val.store_id == store_id)
				let goods = shop.medical_list.find(val => val.id == item.id)
				goods.cart_num++
				this.countPrice() // 计算价格
				service_mall.goods_numSave({
					id: item.id,
					num: goods.cart_num
				})
			},

			// 删减商品
			minusCart(store_id, item) {
				console.log(item)
				let cart = this.cart
				let shop = cart.find(val => val.store_id == store_id)
				let goods = shop.medical_list.find(val => val.product_id == item.product_id)
				if (goods.cart_num > 1) {
					goods.cart_num--
					this.countPrice() // 计算价格
					service_mall.goods_numSave({
						id: item.id,
						num: goods.cart_num
					})
				} else {
					uni.showModal({
						title: '提示',
						content: '确认删除该项?',
						success: (res) => {
							if (res.confirm) {
								service_mall.goods_del({
									id: item.id,
								}).then(res => {
									if (res.code == 1) {
										this.getCartList()
									}
								})
							} else if (res.cancel) {

							}
						}
					});
				}
			},
			// 删减多选商品
			minusCartAll() {
				let ids = [];
				this.cart.map(item1 => {
					if (item1.medical_list && item1.medical_list.length > 0) {
						item1.medical_list.map(item2 => {
							if (item2.select) {
								ids.push(item2.id)
							}
						})
					}
				})
				if (ids.length < 1) {
					return
				}
				uni.showModal({
					title: '提示',
					content: '确认删除所选项?',
					success: (res) => {
						if (res.confirm) {
							service_mall.goods_del({
								id: ids.join(","),
							}).then(res => {
								if (res.code == 1) {
									this.getCartList()
								}
							})
						} else if (res.cancel) {

						}
					}
				});
			},
			// 添加产品包数量
			addpackCart(id, item) {
				let cart = this.productcart
				let product = cart.find(val => val.pack_id == id)
				product.buy_num++
				this.packCountPrice() // 计算价格
				service_mall.packCatrNum({
					cart_ids: item.cart_id,
					buy_num: product.buy_num
				})
			},

			// 删减产品包数量
			minuspackCart(id, item) {
				let cart = this.productcart
				let product = cart.find(val => val.pack_id == id)
				if (product.buy_num > 1) {
					product.buy_num--
					this.packCountPrice() // 计算价格
					service_mall.packCatrNum({
						cart_ids: item.cart_id,
						buy_num: product.buy_num
					})
				} else {
					uni.showModal({
						title: '提示',
						content: '确认删除该项?',
						success: (res) => {
							if (res.confirm) {
								service_mall.packCartDelete({
									cart_ids: item.cart_id,
								}).then(res => {
									if (res.code == 1) {
										uni.showToast({
											title: '购物车删除成功',
											icon: 'success'
										});
										this.getPackCartList()
									}
								})
							} else if (res.cancel) {

							}
						}
					});
				}
			},
			// 删减多选产品包
			productCartAll() {
				let ids = [];
				this.productcart.map(item => {
					if (item.select) {
						ids.push(item.cart_id)
					}
				})
				if (ids.length < 1) {
					return
				}
				uni.showModal({
					title: '提示',
					content: '确认删除所选项?',
					success: (res) => {
						if (res.confirm) {
							service_mall.packCartDelete({
								cart_ids: ids.join(","),
							}).then(res => {
								if (res.code == 1) {
									uni.showToast({
										title: '购物车删除成功',
										icon: 'success'
									});
									this.getPackCartList()
								}
							})
						} else if (res.cancel) {

						}
					}
				});
			},
			//去结算
			toCartList() {
				let token = uni.getStorageSync('token');
				if (!token) {
					uni.navigateTo({
						url: '/pages_login/pages/login/login/index',
					});
				} else {
					if (!this.cart.length) {
						uni.showToast({
							title: '暂无可结算商品，再看看吧！',
							icon: 'none',
							duration: 2000
						});
						return
					} else {

						let ary = []
						this.cart.forEach(val => {
							val.medical_list.forEach(v => {
								if (v.select) {
									ary.push(
										v.id
									)
								}
							})
						})
						if (!ary.length) {
							uni.showToast({
								title: '先选择结算产品',
								icon: 'none',
								duration: 2000
							});
							return
						}
						let params = {
							origin_type: 1,
							cart_ids: ary.join(),
							goods: '',
						};
						console.log(params)
						uni.setStorage({
							key: 'local_order_list',
							data: params,
							success: () => {
								uni.navigateTo({
									url: "/pages_mall/pages/mall/order/order?sourceFrom=detail&Nocart=2"
								})
							}
						});
					}
				}
			},
			//去产品包结算
			toproductList() {
				let token = uni.getStorageSync('token');
				if (!token) {
					uni.navigateTo({
						url: '/pages_login/pages/login/login/index',
					});
				} else {
					if (!this.productcart.length) {
						uni.showToast({
							title: '暂无可结算产品包，再看看吧!',
							icon: 'none',
							duration: 2000
						});
						return
					} else {
						let ary = []
						this.productcart.forEach(v => {
							if (v.select) {
								ary.push(
									v.cart_id
								)
							}
						})
						if (!ary.length) {
							uni.showToast({
								title: '先选择结算产品',
								icon: 'none',
								duration: 2000
							});
							return
						}
						let params = {
							origin_type: 1,
							cart_ids: ary.join(),
							goods: ''
						}
						uni.setStorage({
							key: 'order_list',
							data: params,
							success: () => {
								uni.navigateTo({
									url: "/pages_product/pages/product/order/order?sourceFrom=detail&Nocart=2"
								})
							}
						});
					}
				}
			},
			// 跳转页面
			toPage(page, {
				store_id
			} = {}) {
				if (page === 'store') uni.navigateTo({
					url: "/pages_mall/pages/mall/store/store?store_id=" + store_id
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.cart {

		// 顶部操作栏
		.c_top {
			height: 80rpx;
			line-height: 80rpx;
			font-size: 24rpx;
			padding-left: 36rpx;
			background: #fff;

			.c_tTxt {
				color: #787878;
			}

			.c_tBtn {
				height: 100%;
				padding: 0 32rpx;
				float: right;
			}
		}

		.i_top {
			position: relative;
			z-index: 100;

			.i_tCan {
				width: 100%;
				height: 66rpx;
				padding-left: 50rpx;
				padding-right: 50rpx;

				view {
					display: inline-block;
					width: 50%;
					text-align: center;
					line-height: 66rpx;
					position: relative;
					color: #333;
					font-size: 30rpx;
					margin: 0 10rpx;
				}

				.active {
					text {
						position: absolute;
						bottom: 0;
						left: 50%;
						margin-left: -20rpx;
						display: block;
						width: 40rpx;
						height: 8rpx;
						border-radius: 8rpx;
						background: #FFD425;
					}
				}
			}
		}

		// 购物车
		.c_cart {
			padding-bottom: 136rpx;
			overflow: hidden;

			.c_cGroup {
				margin-top: 16rpx;
				background: #fff;
			}

			.c_cShop {
				height: 100rpx;
				padding-left: 112rpx;
				position: relative;
				display: flex;
				align-items: center;

				&::after {
					content: "";
					width: 100%;
					height: 1px;
					background: rgba(0, 0, 0, .08);
					position: absolute;
					bottom: 0;
					left: 0;
					transform: scaleY(.5);
				}

				.c_csInto {
					width: 122rpx;
					height: 44rpx;
					line-height: 44rpx;
					text-align: center;
					color: #cbaf87;
					font-size: 22rpx;
					margin-top: -22rpx;
					border: 1px solid #e7dec8;
					border-radius: 22rpx;
					position: absolute;
					top: 50%;
					right: 32rpx;
				}

				.c_csLogo {
					width: 50rpx;
					height: 50rpx;
					margin-right: 16rpx;
					border-radius: 50%;
					background: #f6f7fb;
					overflow: hidden;
				}
			}

			.c_cItem {
				min-height: 252rpx;
				padding: 24rpx 24rpx 24rpx 112rpx;
				position: relative;

				&::after {
					content: "";
					width: 100%;
					height: 1px;
					background: rgba(0, 0, 0, .08);
					position: absolute;
					bottom: 0;
					left: 38rpx;
					right: 0;
					transform: scaleY(.5);
				}

				&:last-child::after {
					content: none;
				}

				.c_cImage {
					width: 150rpx;
					height: 150rpx;
					margin-right: 16rpx;
					border-radius: 4rpx;
					background: #f6f7fb;
					float: left;
					position: relative;

					.pack {
						background: #E7AD14;
						color: #fff;
						position: absolute;
						top: 0;
						left: 0;
						font-size: 24rpx;
						padding: 5rpx 15rpx;
					}
				}

				.c_cCont {
					overflow: hidden;
				}

				.c_cName {
					height: 40rpx;
					line-height: 40rpx;
					color: #1a1c20;
				}

				.c_cSize {
					max-width: 100%;
					height: 44rpx;
					line-height: 44rpx;
					color: #939393;
					font-size: 24rpx;
					padding: 0 38rpx 0 14rpx;
					margin-top: 12rpx;
					border-radius: 4rpx;
					background: #f9f6f3;
					position: relative;
					display: inline-block;

					.c_csIcon {
						width: 32rpx;
						height: 32rpx;
						line-height: 32rpx;
						text-align: center;
						font-size: 22rpx;
						margin-top: -19.5rpx;
						position: absolute;
						top: 50%;
						right: 8rpx;
						transform: rotate(90deg);
					}
				}

				.c_cPrice {
					height: 44rpx;
					line-height: 44rpx;
					color: #ef5854;
					font-size: 20rpx;
					font-weight: bold;
					margin-top: 12rpx;

					&>text {
						font-size: 32rpx;
					}
				}

				.c_cPrice2 {
					color: #999;
					font-size: 20rpx;
					margin-top: 12rpx;

					&>text {
						font-size: 28rpx;
						text-decoration: line-through;
					}
				}

				.c_ccart_nums {
					height: 48rpx;
					position: absolute;
					bottom: 24rpx;
					right: 6rpx;
					display: flex;
				}

				.c_cncart_num {
					width: 72rpx;
					height: 48rpx;
					line-height: 48rpx;
					text-align: center;
					border-radius: 8rpx;
					background: #f6f7fb;
				}

				.c_cnMinus,
				.c_cnAdd {
					width: 72rpx;
					height: 48rpx;
					position: relative;
				}

				.c_cnMinus::before,
				.c_cnAdd::before,
				.c_cnAdd::after {
					content: "";
					width: 24rpx;
					height: 4rpx;
					border-radius: 4rpx;
					background: #333;
					position: absolute;
					top: 50%;
					left: 50%;
					transform: translate(-50%, -50%);
				}

				.c_cnAdd::after {
					width: 4rpx;
					height: 24rpx;
				}
			}

			.c_cSelect {
				width: 108rpx;
				height: 100%;
				position: absolute;
				top: 0;
				left: 0;
				display: flex;
				justify-content: center;
				align-items: center;

				&.active .c_csIcon {
					border: none;
					background: #cbaf87;

					&>image {
						display: block;
					}
				}

				.c_csIcon {
					width: 36rpx;
					height: 36rpx;
					border: 1px solid rgba(0, 0, 0, .2);
					border-radius: 50%;

					&>image {
						display: none;
					}
				}
			}
		}

		.c_csName {
			text-overflow: ellipsis;
			white-space: nowrap;
			overflow: hidden;
			width: 65%;
		}

		// 提交订单栏
		.c_submit {
			.c_sLeft {
				width: 100%;
				height: 100%;
				color: #fff;
				font-size: 26rpx;
				display: flex;
				align-items: center;

				.c_sSelect {
					width: 36rpx;
					height: 36rpx;
					margin: 0 12rpx 0 18rpx;

					&.active .c_ssTrue,
					.c_ssFalse {
						display: block;
					}

					&.active .c_ssFalse,
					.c_ssTrue {
						display: none;
					}

					.c_ssFalse,
					.c_ssTrue {
						width: 100%;
						height: 100%;
					}
				}

				.c_cTxt1 {
					padding-right: 24rpx;
				}

				.c_cTxt3 {
					font-size: 20rpx;
					padding-left: 4rpx;

					&>text {
						font-size: 28rpx;
					}
				}

				.c_cTxt4 {
					color: #939393;
					font-size: 16rpx;
					padding-left: 4rpx;

					&>text {
						text-decoration: line-through;
						font-size: 20rpx;
					}
				}
			}
		}

	}

	.c_m2 {
		font-size: 26rpx;
		color: #999;
		margin-top: 10rpx;
		margin-bottom: 15rpx;
	}

	.yprice {
		border: 1px #E9423E solid;
		display: inline-block;
		font-size: 16rpx;
		line-height: 30rpx;
		padding-right: 10rpx;
		color: #e9423e;
		margin-top: 10rpx;
		border-radius: 3rpx;

		i {
			display: inline-block;
			background: #E9423E;
			color: #fff;
			font-weight: normal;
			font-size: 16rpx;
			line-height: 34rpx;
			float: left;
			padding: 0 10rpx;
			margin-right: 5rpx;
		}

		text {
			font-size: 22rpx;
		}
	}

	.c_sRight {
		width: 100%;
		text-align: center;
		line-height: 60rpx;
	}

	.cart .pacuk .c_cart .c_cItem {
		min-height: 200rpx;
	}
</style>
